package dcutils.sock;

/**
 * Represents asyncronous input functionality which can be deactivated when it is no longer needed.<br/>
 * Extending class must implement the run method from runnable and should run it in a thread.<br/>
 * The run method is meant to observe the <q>active</q> field which suggests if the run method should be kept alive.<br/>
 * @author dca
 */
public abstract class AsyncInput implements Runnable {
   protected boolean active; // Indicator of whether this command line input listener is currently in use.

   public boolean isActive() {
      return this.active;
   } // END isActive

   public void deactivate() {
      this.active = false;
   } // END deactivate
} // END abstract class AsyncInput
